package com.szzg10.pattern.command;

public class Fan {

	public enum LEVEL {
		HIGH, MEDIUM, LOW
	}
	
	private LEVEL level;
	
	public void high() {
		this.level = LEVEL.HIGH;
		System.out.println("Fan is " + LEVEL.HIGH + "!!!");
	}
	
	public void medium() {
		this.level = LEVEL.MEDIUM;
		System.out.println("Fan is " + LEVEL.MEDIUM + "!!");
	}
	
	public void low() {
		this.level = LEVEL.LOW;
		System.out.println("Fan is " + LEVEL.LOW + "!");
	}
	
	//---getter and setter---
	public LEVEL getLevel() {
		return level;
	}

	public void setLevel(LEVEL level) {
		this.level = level;
	}

}
